package bigdata.backend.utils;

public enum DbType {
    MYSQL, DORIS, POSTGRESQL;

    public static DbType fromString(String type) {
        if (type == null) throw new IllegalArgumentException("dbType 不能为空");
        switch (type.toLowerCase()) {
            case "mysql":
                return MYSQL;
            case "doris":
                return DORIS;
            case "postgresql":
                return POSTGRESQL;
            default:
                throw new IllegalArgumentException("不支持的数据库类型：" + type);
        }
    }
}
